﻿using LView.CMS.Models;
using LView.CMS.ViewModels;
using LView.CMS.ViewModels.Assets;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;

namespace LView.CMS.IServices
{
    public interface IAssetsService
    {
        /// <summary>
        /// 新增资源
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<(BaseResult, LFile)> AddAssetsAsync(CourseAddOrModify input);

        /// <summary>
        /// 存储资源
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<string> FileSave(HttpRequest request);

        /// <summary>
        /// 分片上传资源合并
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<(bool, string)> FileMerge(HttpRequest request);

        /// <summary>
        /// 加载文件资源列表
        /// </summary>
        /// <returns></returns>
        Task<TableDataModel> LoadData(FileRequestModel model);

        /// <summary>
        /// 删除资源文件
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        Task<BaseResult> DeleteIdsAsync(string[] Ids);

        (int, string, string) UploadImage(IFormFile imgFile);
    }
}
